﻿package 
{

    public class UserData extends Object
    {
        private static var _user:Object;
        private static var _bag:Object;
        private static var _online:Object;
        private static var _other:Array = new Array();

        public function UserData()
        {
            return;
        }// end function

        public static function getData(param1:int) : Object
        {
            return _other[param1];
        }// end function

        public static function setData(param1:int, param2:Object) : void
        {
            _other[param1] = param2;
            return;
        }// end function

        public static function getUserData(param1:String = null)
        {
            if (_user)
            {
                if (param1)
                {
                    return _user[param1];
                }
                return _user;
            }
            else
            {
                return null;
            }
        }// end function

        public static function getBagData(param1:String = null)
        {
            if (_bag)
            {
                if (param1)
                {
                    return _bag[param1];
                }
                return _bag;
            }
            else
            {
                return null;
            }
        }// end function

        public static function getOnlineData(param1:String = null)
        {
            if (_online)
            {
                if (param1)
                {
                    return _online[param1];
                }
                return _online;
            }
            else
            {
                return null;
            }
        }// end function

        public static function initBag(param1:Object) : void
        {
            _bag = param1;
            return;
        }// end function

        public static function initUser(param1:Object) : void
        {
            _user = param1;
            return;
        }// end function

        public static function initOnline(param1:Object) : void
        {
            _online = param1;
            return;
        }// end function

    }
}
